51adcdc69c0c2d5a407869f6b055dcb870ecf53c,src/deepstreamTest/java/io.deepstream/Application.java,Application,Application,#,12

Before Change



            DeepstreamClient ds = new DeepstreamClient( "localhost:6021" );
            ds
                    .addConnectionChangeListener( this )
                    .setRuntimeErrorHandler(new DeepstreamRuntimeErrorHandler() {
                        @Override
                        public void onException(Topic topic, Event event, String msg) {
                            System.out.println( "Error occured " + topic + " " + event + " " + msg );
                        }
                    })
                    .login( authData, this );

            Thread.sleep(1000);
            authData = new JsonObject();

After Change


    public Application() {

        try {
            JsonObject authData = new JsonObject();
            authData.addProperty( "username", "Wolfram" );

            DeepstreamClient ds = new DeepstreamClient( "localhost:6021" );
            ds
                    .addConnectionChangeListener( this )
                    .login( authData, this )
                    .setRuntimeErrorHandler(new DeepstreamRuntimeErrorHandler() {
                        @Override
                        public void onException(Topic topic, Event event, String msg) {